<?php

namespace App\Http\Requests\API;

use App\Models\OfflineUser;
use InfyOm\Generator\Request\APIRequest;

class CreateOfflineUserAPIRequest extends APIRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'bail|required|string|max:64|unique:offline_users',
            'true_name' => 'string|max:64',
//            'email' => 'email',
//            'phone' => 'string:max:20',
//            'roles' => 'bail|string',
            'organization_id' => 'bail|required|exists:organizations,id'
        ];
    }
}
